// Copyright (C) Kumo inc. and its affiliates.
// Author: Jeff.li lijippy@163.com
// All rights reserved.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published
// by the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <https://www.gnu.org/licenses/>.
//

package localdata

// DefaultKmoptHome represents the default home directory for this build of kmopt
// If this is left empty, the default will be thee combination of the running
// user's home directory and ProfileDirName
var DefaultKmoptHome string

// ProfileDirName is the name of the profile directory to be used
var ProfileDirName = ".kmopt"

// Notice: if you try to add a new env name which is notable by the user, shou should
// add it to cmd/env.go:envList so that the command `kmopt env` will show that env.
const (
	// ComponentParentDir represent the parent directory of all downloaded components
	ComponentParentDir = "components"

	// ManifestParentDir represent the parent directory of all manifests
	ManifestParentDir = "manifests"

	// KeyInfoParentDir represent the parent directory of all keys
	KeyInfoParentDir = "keys"

	// DefaultPrivateKeyName represents the default private key file stored in ${KMOPT_HOME}/keys
	DefaultPrivateKeyName = "private.json"

	// DataParentDir represent the parent directory of all running instances
	DataParentDir = "data"

	// TelemetryDir represent the parent directory of telemetry info
	TelemetryDir = "telemetry"

	// StorageParentDir represent the parent directory of running component
	StorageParentDir = "storage"

	// EnvNameInstanceDataDir represents the working directory of specific instance
	EnvNameInstanceDataDir = "KMOPT_INSTANCE_DATA_DIR"

	// EnvNameComponentDataDir represents the working directory of specific component
	EnvNameComponentDataDir = "KMOPT_COMPONENT_DATA_DIR"

	// EnvNameComponentInstallDir represents the install directory of specific component
	EnvNameComponentInstallDir = "KMOPT_COMPONENT_INSTALL_DIR"

	// EnvNameWorkDir represents the work directory of KMOPT where user type the command `kmopt xxx`
	EnvNameWorkDir = "KMOPT_WORK_DIR"

	// EnvNameUserInputVersion represents the version user specified when running a component by `kmopt component:version`
	EnvNameUserInputVersion = "KMOPT_USER_INPUT_VERSION"

	// EnvNameKmoptVersion represents the version of KMOPT itself, not the version of component
	EnvNameKmoptVersion = "KMOPT_VERSION"

	// EnvNameHome represents the environment name of kmopt home directory
	EnvNameHome = "KMOPT_HOME"

	// EnvNameTelemetryStatus represents the environment name of kmopt telemetry status
	EnvNameTelemetryStatus = "KMOPT_TELEMETRY_STATUS"

	// EnvNameTelemetryUUID represents the environment name of kmopt telemetry uuid
	EnvNameTelemetryUUID = "KMOPT_TELEMETRY_UUID"

	// EnvNameTelemetryEventUUID represents the environment name of kmopt telemetry event uuid
	EnvNameTelemetryEventUUID = "KMOPT_TELEMETRY_EVENT_UUID"

	// EnvNameTelemetrySecret represents the environment name of kmopt telemetry secret
	EnvNameTelemetrySecret = "KMOPT_TELEMETRY_SECRET"

	// EnvTag is the tag of the running component
	EnvTag = "KMOPT_TAG"

	// EnvNameSSHPassPrompt is the variable name by which user specific the password prompt for sshpass
	EnvNameSSHPassPrompt = "KMOPT_SSHPASS_PROMPT"

	// EnvNameNativeSSHClient is the variable name by which user can specific use native ssh client or not
	EnvNameNativeSSHClient = "KMOPT_NATIVE_SSH"

	// EnvNameSSHPath is the variable name by which user can specific the executable ssh binary path
	EnvNameSSHPath = "KMOPT_SSH_PATH"

	// EnvNameSCPPath is the variable name by which user can specific the executable scp binary path
	EnvNameSCPPath = "KMOPT_SCP_PATH"

	// EnvNameKeepSourceTarget is the variable name by which user can keep the source target or not
	EnvNameKeepSourceTarget = "KMOPT_KEEP_SOURCE_TARGET"

	// EnvNameMirrorSyncScript make it possible for user to sync mirror commit to other place (eg. CDN)
	EnvNameMirrorSyncScript = "KMOPT_MIRROR_SYNC_SCRIPT"

	// EnvNameLogPath is the variable name by which user can write the log files into
	EnvNameLogPath = "KMOPT_LOG_PATH"

	// EnvNameDebug is the variable name by which user can set kmopt runs in debug mode(eg. print panic logs)
	EnvNameDebug = "KMOPT_CLUSTER_DEBUG"

	DevNameDebug = "KMOPT_CLUSTER_DEBUG"

	// MetaFilename represents the process meta file name
	MetaFilename = "kmopt_process_meta"
)
